//
//  WebsiteIntroViewController.m
//  Qya
//
//  Created by maxwellpang on 12-9-7.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "WebsiteIntroViewController.h"

@interface WebsiteIntroViewController ()

@end

@implementation WebsiteIntroViewController

@synthesize icon;
@synthesize webTitle;
@synthesize WebsitePic;
@synthesize detail;
@synthesize keyword_1;
@synthesize keyword_2;
@synthesize keyword_3;
@synthesize subcribe;
@synthesize wholePic;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
        icon = [[UIImageView alloc]init];
        keyword_1 = [[UIButton alloc]init];
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)viewDidUnload
{
    [self setWholePic:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (void)setViewContent:(NSArray*)contextArray
{
    [icon setImage:[UIImage imageNamed:[contextArray objectAtIndex:0]]];
    [WebsitePic setImage:[UIImage imageNamed:[contextArray objectAtIndex:1]]];
    [webTitle setText:[contextArray objectAtIndex:2]];
    [detail setText:[contextArray objectAtIndex:3]];
     
    [keyword_1 setTitle:[contextArray objectAtIndex:4] forState:UIControlStateNormal];    
    [keyword_2 setTitle:[contextArray objectAtIndex:5] forState:UIControlStateNormal];
    [keyword_3 setTitle:[contextArray objectAtIndex:6] forState:UIControlStateNormal];
    
    [keyword_1 setTintColor:[UIColor colorWithRed:(148/255.0) green:(207/255.0) blue:(59/255.0) alpha:1.0]];
    [keyword_2 setTintColor:[UIColor colorWithRed:(148/255.0) green:(207/255.0) blue:(59/255.0) alpha:1.0]];
    [keyword_3 setTintColor:[UIColor colorWithRed:(148/255.0) green:(207/255.0) blue:(59/255.0) alpha:1.0]];
}

@end
